.gif) |
.gif) |
.gif) |
|
|

|
Clyde's Online is the web home
of Clyde's on Madison, the most upscale pharmacy
in New York City's upper east side. They offer
fine European bath and body products, cosmetics,
fragrances, and more. With many out-of-state
phone and catalog orders, it was time to make a
presence on the web and make it easier for
customers to shop at Clyde's. Firstborn combined
Macromedia Flash MX and Microsoft Commerce
Server 2002 to create e-commerce with the
Firstborn touchan exciting, dynamic, and
stylish shopping experience.
Technical
Challenge Wanting more than just the
normal e-commerce website, our clients
challenged us to be creative with how the site
was presented. Naturally we used our experience
with Macromedia Flash MX to build the site.
The latest version of Macromedia Flash MX
made it possible for us to develop a dynamic
e-commerce website. We were able to create a
Macromedia Flash MX "face" on a fully
functional, dynamic website so what the user
sees is entirely in Macromedia Flash MXall the
way from the homepage to the checkout. The most
important new capabilities utilized in clydesonline.com were JPEG
loading, text formatting, and variable loading.
With these new features we were able to import
external images and data easily and effectively
while creating an interactive shopping
experience.
| | |
|
 |
Figure
1. Clyde's Online (click the image above to see
a full-size version) |
History Before we
ever considered approaching an e-commerce website with
Macromedia Flash MX, we had some experience
communicating between Macromedia Flash MX and the
server. Our first attempt at a dynamic Flash website was
for the Calvin Klein monthly newsletter (figure 2). This
website is used as a communication tool for Calvin
Kleins partners and retailers. It is designed to be
updated monthly via an HTML administration tool and upon
update the old issues are archived in a drop-down menu.
All of this is now done without ever touching the
Macromedia Flash MX files. In addition the newsletter is
published in seven languages including Chinese and
Japanese, which is made possible by Unicode character
support in Macromedia Flash MX.
|
|
|
 |
Figure
2. Calvin Klein newsletter (click the image
above to see a full-size version) |
With the experience gained from the Calvin Klein
Newsletter, we felt we could take the new capabilities
of Macromedia Flash MX to the next level
e-commerce.
When we were approached by Clydes Chemist to build an
e-commerce website we were very excited at the
opportunity. We showed them what we could do with
Macromedia Flash MX and how it could be applied to an
e-commerce shopping experience. They loved the idea.
Logistics of E-commerce Before a
line of code was ever written we had to address all of
the logistics of building an e-commerce website. Not
only were we dealing with product inventory, user
accounts, and personal information but also shipping and
credit card verification within the Macromedia Flash MX
environment. We really wanted to make the shopping
experience seamless from start to finish without using
HTML. We determined that the role of Macromedia Flash MX
was to function only as the client interface which would
communicate with the server using ASP.NET.
The e-commerce architecture was broken down into four
business objects. Each business object would handle
specific functions in the purchasing
process.
|
1 |
Inventory |
|
a |
Deals
(new or sale products featured on the
homepage) |
b |
Product
Categories (fragrances, cosmetics,
etc.) |
c |
Product
Descriptions |
d |
Shop By
Brand |
e |
Free text
search | |
2 |
Shopping
Cart |
|
a |
Add
products to shopping bag |
b |
Remove
products from shopping bag |
c |
Calculating product
totals | |
3 |
Accounts |
|
a |
New
accounts |
b |
Existing
accounts | |
4 |
Credit Card
Forms and Verification |
|
a |
Shipping
calculation |
b |
Credit
card
verification | | |
|
Once the
interface was designed and the architecture was decided,
we began to develop the Macromedia Flash MX components
(scrollbars, search fields, pull-down menus). The
components were developed to handle dynamic data from
the server while utilizing an important feature of
Macromedia Flash MXanimation.
Communicating with Macromedia Flash
MX When the components were finished, we
began to take our first steps at communicating between
Macromedia Flash MX and the database. At this point, the
database had already been populated with products and
queries were working between ASP.NET and the database.
Pulling the data from the database was very easy in
Macromedia Flash MX. It all boiled down to a simple
loadVariables command
as shown below:
|
loadVariables("productcategory.aspx?Category=fragrances",
"POST"); |
|
This request asks
for all of the data associated with fragrances in the
database. Information about the products such as product
name, company name, description, price, image names, SKU
numbers, and so on are returned to Macromedia Flash MX
through ASP.NET. Once this data is received by
Macromedia Flash MX, products are displayed and the user
can browse through them quickly and easily (figure
3). |
|
 |
Figure
3. Fragrances (click the image above to see a
full-size version) |
When developing the website, one of the major
issues was compatibility. The client wanted to be able
to reach as many people as possible. This meant it had
to work in all major browsers on both PC and Mac
platforms. One of the biggest problems we had with this
was JPEG loading. Over slower connections AOL will
convert the JPG format into the more compressed ART file
format for faster download speeds. This is a problem for
Macromedia Flash Player because it cannot load the ART
file format. The only fix for this problem was to change
the file extension of the JPG to something else (such as
FPG). This tricks AOL and the FPG file is not
compressed. Macromedia Flash MX can still read the FPG
as a JPG and the player can import the image.
In order for the user to shop on the website, site
visitors must have cookies enabled on their computer.
When the user enters the website, a cookie is stored on
the clients computer. The contents of the users
shopping bag are stored on the server and the cookie on
their computer associates their computer to the shopping
bag on the server. When the user registers, a persistent
cookie is written to their computer to identify them
when they return to the site. |
|
 |
Figure
4. Product Detail (click the image above to see
a full-size version) |
Selecting a product will enlarge the image and
display the product detail information (figure 4).
Customers can then select sizes, colors, quantities and
add items to their shopping bag. Every time the user
adds products to their shopping bag, the information on
the server is updated. This is to ensure that the
information is synchronized between what the user sees
and what is stored on the server. Like all other queries
to the server, Macromedia Flash MX merely asks for the
data and waits to display whatever it receives. This is
an example of the query sent to the server to obtain the
contents of the shopping bag (figure 5):
|
|
loadVariables("shoppingbag.aspx",
"POST") |
|
 |
Figure
5. Shopping Bag (click the image above to see a
full-size version) |
Once the user has seen and updated quantities of
their shopping bag, they have the option to either make
a purchase or continue shopping. If they choose to
purchase the contents of their cart, they can either
create a new account or sign into an existing account.
Once the user has created a new account, the contents of
their shopping bag are associated with their new account
through a username and password (figure 6).
|
|
 |
Figure
6. Check OutLogin/Create New Account (click
the image above to see a full-size version) |
|
When the account
has been created, the next step is to add shipping and
billing addresses to the user's profile. When the
addresses have been submitted to the user's account,
they can select a shipping method and add their credit
card information to their account. When the shipping
method and credit card form is completed, a request is
made to UPS via XML for the shipping cost of the
purchase. The shipping cost is based on the shipping
type, the product's weight, and customers location
(figure 7). |
|
 |
Figure
7. Check OutShipping/Payment Info (click the
image above to see a full-size version) |
Rather than Macromedia Flash MX directly
requesting the shipping cost from UPS, the request is
first sent to the server, then routed to UPS, then back
to ASP.NET, and then back to Macromedia Flash MX. This
is to ensure that the everything is synchronized between
Macromedia Flash MX and the server. Its important that
Macromedia Flash MX is only the interface, we don't want
it to do any unnecessary calculations that can be
handled by the server more efficiently. When the
shipping cost is returned to Macromedia Flash MX, it
also receives the subtotal, tax, and total for the
purchase. At this point, the user can officially make
the purchase and verify their credit card (figure 8). To
do this, Macromedia Flash MX sends this
request:
|
|
loadVariables("checkout.aspx",
"POST") |
|
 |
Figure
8. Check OutOverview/Final Purchase (click the
image above to see a full-size version) |
Once again, Macromedia Flash MX uses ASP.NET to
communicate with the server. When the purchase is
actually made, ASP.NET sends the purchase and credit
card information to Authorize.net for verification. When
the card is verified, the approval is returned to
Macromedia Flash MX and the customer sees the order
confirmation page. At this point, the user has the
option to print an invoice for their order directly from
Macromedia Flash MX. A copy of the invoice is also
e-mailed to the user and another is sent to Clydes for
order fulfillment and shipment.
Final Thoughts Clydes Online
shows what can be done using Macromedia Flash MX to take
e-commerce to the next levelno more boring HTML credit
card forms or static pages.
In the future, the challenge will be to improve the
efficiency of communicating between Macromedia Flash MX
and the server, as well as finding other ways to make
the application perform faster. We want to find a way to
create a dynamic e-commerce site using Macromedia Flash
MX that enhances the shopping experience without adding
extra wait time for customers.
As computers continue to become faster and Macromedia
Flash MX is bundled with more systems and browsers, I'm
certain we'll see more and more businesses opting for
Macromedia Flash MX e-commerce sitesnot only for the
cool factor, but because of the way Macromedia Flash MX
can enhance online shopping with intuitive navigation,
more interaction with the products, and an overall
richer experience. |
|
-------------------------------------------------------------------------------------------------------------------------------------- |
About the authors Ryan Thomas
is responsible for producing and managing projects at
Firstborn. As executive producer, he makes sure clients
objectives are met, in terms of design and
functionality, schedule and cost. Ryan has been with
Firstborn for 3 years. He brings his knowledge of design
and technology to his role as producer, he has been
involved in every step of our working process from
project start to finish. Ryan has a Graphic Design
degree from Kansas State University. He lives in New
York City.
Shea Gonyo is senior developer at
Firstborn and has worked there for three years. As
senior developer, his role is to create rich media
applications for the web and cd-rom. He utilizes his
background in print design, video, drawing and painting
to create highly interactive and animated applications
for high profile clients like Calvin Klein, Gucci and
Ralph Lauren Fragrances. Shea graduated from the
University of New York at Plattsburgh with a BA of Fine
Arts. |
|
Submit
feedback on our tutorials, articles, and sample
applications. |
|